<script type="text/javascript">{$javaScript}</script>
<!-- style sheet -->
<style type="text/css">{$styleSheet}</style>

<!-- menu include -->
{include file="menu.tpl"}

<div>
<h1>{$firstname} {$lastname}</h1>
  <div id="user-pic">
  <img src="{$imageSrc}" />
  </div>
  <div id="user-detail">
      
    {if $edit}
	  <form method="post" action="{$HOST}/user-profile.php">
	  <input type="hidden" name="do" value="update" />
	  <table>
	  <tr>
	  <td>First Name:</td><td><input type="text" name="first-name" value="{$firstname}" /></td>
	  </tr>
	  <tr>
	  <td>Last Name:</td><td><input type="text" name="last-name" value="{$lastname}" /></td>
	  </tr>
	  <tr>
	  <td>Location:</td> <td>{html_options name=country options=$countries selected=$locationCode }</td>
	  </tr>
	  <tr>
	  <td>Wii code:</td><td><input type="text" name="wii-code" value="{$wiiCode}" /></td>
	  </tr>
	  <tr>
	  <td>Preferred Amazon store:</td> <td>{html_options selected=$storeCode name=amazon-store options=$amazonLocales }</td>
	  </tr>
	  <tr><td colspan="2">&nbsp;</td></tr>
	  <tr>
	  <td colspan="2"><input type="submit" value="Save" /></td>
	  </tr>
	  </table>
	  </form>
    {else}
      <table>
      <tr>
      <td><b>First Name: </b></td> <td>{$firstname}</td>
      </tr>
      <tr>
      <td><b>Last Name: </b></td> <td>{$lastname}</td>
      </tr>
      <tr>
      <td><b>Location: </b></td> <td>{$locationString}</td>
      </tr>
      <tr>
      <td><b>Wii code:</b></td> <td>{$wiiCode}</td>
      </tr>
      <tr>
      <td><b>Preferred Amazon store:</b></td> <td>{$storeString}</td>
      </tr></table>
    {/if}
  </div>
</div>
<fb:google-analytics uacct="UA-1595732-3" />